import { useState,Suspense } from 'react'
import MyRoutes from './pages/Routes'
import {SpinLoading} from 'antd-mobile'
import {useRoutes} from 'react-router-dom'
import { GlobalStyle } from './style'

function App() {
  const element = useRoutes(MyRoutes)
  return (
    <div className="App">
      <Suspense fallback={<SpinLoading color='primary' />}>
        <GlobalStyle/>
        {element}
      </Suspense>
    </div>
  )
}

export default App
